package com.demo.rocketmq.consumer;

import com.demo.rocketmq.constants.TopicConstants;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author K
 */
@Slf4j
@Service
@RocketMQMessageListener(topic = TopicConstants.TEST_TOPIC_1, consumerGroup = "test_another_consumer_group")
public class TestTopic1RocketMqAnotherConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        log.info("received topic={} consumer test_another_consumer_group message: {}", TopicConstants.TEST_TOPIC_1, message);
    }
}
